package hs.framework.opcClient.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.NullSerializer;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.time.LocalDateTime;

/**
 * 数据源信息表,用于对接控制数据实体类
 *
 * @author Blade
 * @since 2021-05-08
 */
@Data
@TableName("th_source_param_b")
@ApiModel(value = "SourceParamB对象", description = "数据源信息表,用于对接控制数据")
@JsonIgnoreProperties({ "isDeleted" })
public class SourceParamB extends BaseEntity {

    /**
     * 主键
     */
    @ApiModelProperty(value = "主键")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long id;

    /**
     * 参数名
     */
    @ApiModelProperty(value = "参数名")
    @JsonSerialize(nullsUsing = NullSerializer.class)
    private String code;

    /**
     * 参数中文名
     */
    @ApiModelProperty(value = "参数中文名")
    @JsonSerialize(nullsUsing = NullSerializer.class)
    private String name;

    /**
     * 参数类型
     */
    @ApiModelProperty(value = "参数类型")
    @JsonSerialize(nullsUsing = NullSerializer.class)
    private String paramType;

    /**
     * 类型
     */
    @ApiModelProperty(value = "类型")
    @JsonSerialize(nullsUsing = NullSerializer.class)
    private String infoType;

    /**
     * 实时值参数
     */
    @ApiModelProperty(value = "实时值参数")
    @JsonSerialize(nullsUsing = NullSerializer.class)
    private String currentValueName;

    /**
     * 参数值类型
     */
    @ApiModelProperty(value = "参数值类型")
    @JsonSerialize(nullsUsing = NullSerializer.class)
    private String valueType;

    /**
     * 参数单位
     */
    @ApiModelProperty(value = "参数单位")
    @JsonSerialize(nullsUsing = NullSerializer.class)
    private String unit;

    /**
     * 参数值精确度
     */
    @ApiModelProperty(value = "参数值精确度")
    @JsonSerialize(nullsUsing = NullSerializer.class)
    private String valuePrecision;

    /**
     * 参数最大值
     */
    @ApiModelProperty(value = "参数最大值")
    @JsonSerialize(nullsUsing = NullSerializer.class)
    private String paramMax;

    /**
     * 参数最小值
     */
    @ApiModelProperty(value = "参数最小值")
    @JsonSerialize(nullsUsing = NullSerializer.class)
    private String paramMin;

    /**
     * 更新时间
     */
    @ApiModelProperty(value = "更新时间")
    @JsonSerialize(nullsUsing = NullSerializer.class)
    private LocalDateTime dataUpdateTime;

    /**
     * 状态解释
     */
    @ApiModelProperty(value = "状态解释")
    @JsonSerialize(nullsUsing = NullSerializer.class)
    private String stateExplain;

    /**
     * 点位类型
     */
    @ApiModelProperty(value = "点位类型")
    @JsonSerialize(nullsUsing = NullSerializer.class)
    private String pointType;

    /**
     * 是否可读
     */
    @ApiModelProperty(value = "是否可读")
    @JsonSerialize(nullsUsing = NullSerializer.class)
    private String canRead;

    /**
     * 是否可写
     */
    @ApiModelProperty(value = "是否可写")
    @JsonSerialize(nullsUsing = NullSerializer.class)
    private String canWrite;

    /**
     * 触发器写入
     */
    @ApiModelProperty(value = "触发器写入")
    @JsonSerialize(nullsUsing = NullSerializer.class)
    private String triggerWrite;

    /**
     * 触发器读取
     */
    @ApiModelProperty(value = "触发器读取")
    @JsonSerialize(nullsUsing = NullSerializer.class)
    private String triggerRead;

    /**
     * 显示的值
     */
    @ApiModelProperty(value = "显示的值")
    @JsonSerialize(nullsUsing = NullSerializer.class)
    private String nominalValue;


    /**
     * 文本
     */
    @ApiModelProperty(value = "文本")
    @JsonSerialize(nullsUsing = NullSerializer.class)
    private String text;

    /**
     * 上次报错
     */
    @ApiModelProperty(value = "上次报错")
    @JsonSerialize(nullsUsing = NullSerializer.class)
    private String LastError;

    /**
     * 参数的值
     */
    @ApiModelProperty(value = "参数的值")
    @JsonSerialize(nullsUsing = NullSerializer.class)
    private String paramValue;

    /**
     * 描述
     */
    @ApiModelProperty(value = "描述")
    @JsonSerialize(nullsUsing = NullSerializer.class)
    private String description;

    /**
     * 设备id
     */
    @ApiModelProperty(value = "设备id")
    @JsonSerialize(nullsUsing = NullSerializer.class)
    private Long equipmentId;

    /**
     * 备注
     */
    @ApiModelProperty(value = "备注")
    @JsonSerialize(nullsUsing = NullSerializer.class)
    private String remarks;

}
